#pragma once

#include "njm_pipeline.hpp"
#include "njm_device.hpp"
#include "njm_game_obj.hpp"
#include "njm_camera.hpp"
#include "njm_frame_info.hpp"

#include <memory>
#include <vector>
#include <string>

namespace njm {

    class SimpleRenderSystem
    {
    private:
        NjmDevice& njmDevice;
        VkPipelineLayout pipelineLayout;
        std::unique_ptr<NjmPipeline> njmPipeline;

        std::string vertShaderPath;
        std::string fragShaderPath;

        void createPipelineLayout(VkDescriptorSetLayout globalSetLayout);
        void createPipeline(VkRenderPass renderPass);

    public:
        SimpleRenderSystem(NjmDevice &device, 
            VkRenderPass renderPass, 
            VkDescriptorSetLayout globalSetLayout, 
            std::string vertShaderPath, std::string fragShaderPath);
        ~SimpleRenderSystem();
        SimpleRenderSystem(const SimpleRenderSystem&) = delete;
        SimpleRenderSystem &operator=(const SimpleRenderSystem&) = delete;

        void renderGameObjs(FrameInfo &frameInfo);
    };
}